# -*- coding: utf-8 -*-

import matplotlib.pyplot as plt 
import numpy as np 
import matplotlib.animation as animation
from mpl_toolkits.mplot3d import Axes3D

# xs = np.random.random(10)
# ys = np.random.random(10)
# zs = np.random.random(10)

fig = plt.figure() #cnhm fci. dqxh mtmt ,, fig

ax = fig.add_subplot(111, projection='3d')

ax.set_xlabel('X')
ax.set_ylabel('Y')
ax.set_zlabel('Z')
# ax.scatter(xs, ys, zs)
ax.set_zlim(0,10)
plt.ylim(-10,10)
plt.xlim(-10,10)

# 生成圆柱数据，底面半径为r，高度为h。
# 先根据极坐标方式生成数据

u = np.linspace(0,2*np.pi,50)  # 把圆分按角度为50等分
nh = np.linspace(0,1,20)        # 把高度1均分为20份
x = np.outer(np.sin(u),np.ones(len(nh)))  # x值重复20次
y = np.outer(np.cos(u),np.ones(len(nh)))  # y值重复20次
z = np.outer(np.ones(len(u)),nh)   # x，y 对应的高度

# gcqm eodq
# def update(i):
#    start = 0 if i 

# dodq
# animation = FuncAnimation(fig, update, 

# Plot the surface
ax.plot_surface(x, y, z, color='#cdcf40')
 
plt.show()

